/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package co.edu.distribuidos.advertisements;

import net.jxta.document.Advertisement;
import net.jxta.document.AdvertisementFactory;
import net.jxta.document.Document;
import net.jxta.document.MimeMediaType;

import net.jxta.document.Element;

/**
 *
 * @author alvar-go@uniandes.edu.co
 */
public class MyAdvertisement extends AdvertisementTemplate{

    private final static String mimeType= "text/xml";

    private final static String[] fields = {};

    public MyAdvertisement(){
        super();
    }
    
    public MyAdvertisement(Element document){
        super();

    }
    @Override
    public Document getDocument(MimeMediaType mmt) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String[] getIndexFields() {
        return fields;
    }

     public static class Instantiator implements AdvertisementFactory.Instantiator{

        public String getAdvertisementType() {
           return AdvertisementTemplate.getAdvertisementType();
        }

        public Advertisement newInstance() {
            return new MyAdvertisement();
        }

        public Advertisement newInstance(Element root) {
            return new MyAdvertisement(root);
        }

    };

}
